package com.hzt.agprosaleplatform.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzt.agprosaleplatform.common.CustomResponse;
import com.hzt.agprosaleplatform.entity.Address;
import com.hzt.agprosaleplatform.entity.User;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface UserService {
    public boolean updateUserInfo(User user);
    
    // 分页获取用户列表，支持搜索
    IPage<User> getUsersPage(Page<User> page, String uid, String username, String role);
    
    List<User> getAllUsers();
    
    boolean updateUser(String uid, User user);
    
    boolean deleteUser(String uid);
    
    // 添加缺失的方法声明
    CustomResponse updateUserAvatar(String uid, MultipartFile file) throws IOException;
    
    CustomResponse updateUserPassword(String uid, String password);
    
    CustomResponse addReceivedAddress(Address address);
    
    List<Address> UserAddressList(String uid) throws IOException;
    
    CustomResponse updateReceivedAddress(Address address) throws IOException;
    
    CustomResponse deleteReceivedAddress(String aid) throws Exception;
}